package tech.aistar.corejava.day02;

/**
 * Created by 李雨昂 on 2019/7/16.
 */
public class CharDemo {
    public static void main(String[] args) {
        //char类型底层是采用Unicode编码

        //byte->short->int->long
        //int -> double
        //chan -> int     ok
        String str = "abc";

        //char类型使用单引号包裹单个字符
        char c1 = '我';
        char c2 = 'a';
        char c3 = 'A';
        char c4 = '\n';
        char c5 = '\t';//一个tab间的距离

        //可以通过终端,输入native2ascii
        char c61 = '\u674e';//某个汉字的unicode编码
        System.out.println("c61 = " + c61);
        char c62 = '\u96e8';
        System.out.println("c62 = " + c62);
        char c63= '\u6602';
        System.out.println("c63 = " + c63);
        char c7 = 65;//A
        System.out.println("c7 = " + c7);
        char c8 = 97;//a
        System.out.println("c8 = " + c8);
        char c9 = 48;//0
        System.out.println("c9 = " + c9);


    }
}
